source 'https://github.com/CocoaPods/Specs.git'
platform :ios, '15.0'

install! 'cocoapods', :deterministic_uuids => false

use_modular_headers!

# Location of gRPC's repo root relative to this file.
GRPC_LOCAL_SRC = '../../../..'

target 'SwiftSample' do
  # Depend on the generated RemoteTestClient library
  pod 'RemoteTest', :path => "../RemoteTestClient"

  # Use the local versions of Protobuf, BoringSSL, and gRPC. You don't need any of the following
  # lines in your application.
  pod '!ProtoCompiler',  :path => "#{GRPC_LOCAL_SRC}/src/objective-c"
  pod '!ProtoCompiler-gRPCPlugin', :path => "#{GRPC_LOCAL_SRC}/src/objective-c"

  pod 'Protobuf', :path => "#{GRPC_LOCAL_SRC}/third_party/protobuf"

  pod 'BoringSSL-GRPC', :podspec => "#{GRPC_LOCAL_SRC}/src/objective-c"

  pod 'gRPC', :path => GRPC_LOCAL_SRC
  pod 'gRPC-Core', :path => GRPC_LOCAL_SRC
  pod 'gRPC-RxLibrary', :path => GRPC_LOCAL_SRC
  pod 'gRPC-ProtoRPC',  :path => GRPC_LOCAL_SRC
end

post_install do |installer|
  installer.pods_project.targets.each do |target|
    target.build_configurations.each do |config|
      config.build_settings['CLANG_CXX_LANGUAGE_STANDARD'] = 'c++17'
      config.build_settings['IPHONEOS_DEPLOYMENT_TARGET'] = '15.0'
    end
  end
end
